import { ExtractPropTypes } from 'vue';
import { createPropsResolver } from '../../dynamic-resolver';
import extendCalendarSchema from './schema/extend-calendar.schema.json';
import { schemaMapper } from './schema/schema-mapper';
// [
//     {
//         "date":"2024/3/7",
//         "task":[
//             {
//                 "startDate":"2024/3/7 8:00",
//                 "endDate":"2024/3/7 8:30",
//                 "task":"参加会议",
//                 "level":1
//             },
//             {
//                 "startDate":"2024/3/7 9:00",
//                 "endDate":"2024/3/7 9:30",
//                 "task":"总结分析",
//                 "level":2
//             },
//             {
//                 "startDate":"2024/3/7 10:00",
//                 "endDate":"2024/3/7 10:30",
//                 "task":"分析解决",
//                 "level":3
//             }
//         ]
//     },
// ]
export const ExtendCalendarProps = {
    beginWeek: { Type: Number, default: 7 },
    data: { Type: Array, default: [] },
    latticeHeight: { Type: Number, default: 60 },
    isDrag: { Type: Boolean, default: true },
    defaultVisible: { Type: Boolean, default: true },
    headerConfig: {
        Type: Object,
        default: {
            date: true,
            action: true,
            toggle: true
        }
    },
} as Record<string, any>;

export type ExtendCalendarPropsType = ExtractPropTypes<typeof ExtendCalendarProps>;

export const propsResolver = createPropsResolver<ExtendCalendarPropsType>(ExtendCalendarProps, extendCalendarSchema, schemaMapper);
